
cmake_minimum_required(VERSION 3.10.2)

project("ffmpeg52")

include_directories(include)
#添加一个系统查找目录
#添加系统环境变量
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L${CMAKE_SOURCE_DIR}/libs/${ANDROID_ABI}")

add_library(
        audio-native-lib
        SHARED
        audio-native-lib.cpp
        )

add_library(
        video-native-lib
        SHARED
        video-native-lib.cpp
)

find_library(
        log-lib
        log)

target_link_libraries(
        audio-native-lib

        avcodec
        avdevice
        avfilter
        avformat
        avutil
        swresample
        swscale
        # Links the target library to the log library
        # included in the NDK.
        android

        ${log-lib})


target_link_libraries(
        video-native-lib

        avcodec
        avdevice
        avfilter
        avformat
        avutil
        swresample
        swscale
        # Links the target library to the log library
        # included in the NDK.
        android

        ${log-lib})